package src.reloadCountdow;

public class ReloadTimer extends Thread{

	private static int reloadingTime;
	private static boolean isReloading;
	
	public static boolean isReloading(){
		return isReloading;
	}
	
	public static void executeReloading(int secondExpressdInMills) {
		isReloading = true;
		reloadingTime = secondExpressdInMills;
		while(reloadingTime > 0){
			int oneSecondInMills = 1000;
			try {
				sleep(oneSecondInMills);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			reloadingTime -= oneSecondInMills;
		}
		isReloading = false;
	}
	
	private ReloadTimer(){}
	
}
